<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.ListPersonnelLangTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <p:dialog     width="80%" height="80%" position="center" modal="true" id="view" widgetVar="PosteDialog">
                <p:outputPanel  autoUpdate="true">
                    <p:panelGrid  id="display"  columns="2" >




                        <h:outputText value="ID" />  
                        <h:outputText value="#{personnelLangController.selectedPersonnellang.nom}" />  





                    </p:panelGrid>
                </p:outputPanel>
            </p:dialog>
            <p:dialog    position="center" modal="true" id="create" widgetVar="CreateDialog">
            
                    <h:form>
                    <h:panelGrid columns="4">
                    <h:outputLabel value="#{bundle.CreatePersonnelLabel_idpersonnel}" for="idpersonnel" />
                    <h:inputText id="idpersonnel" value="#{personnelLangController.perscont.selected.idpersonnel}" title="#{bundle.CreatePersonnelTitle_idpersonnel}" required="true" requiredMessage="#{bundle.CreatePersonnelRequiredMessage_idpersonnel}"/>
                    <h:outputLabel value="#{bundle.CreatePersonnelLabel_cnrps}" for="cnrps" />
                    <h:inputText id="cnrps" value="#{personnelLangController.perscont.selected.cnrps}" title="#{bundle.CreatePersonnelTitle_cnrps}" />
                    <h:outputLabel value="#{bundle.CreatePersonnelLangLabel_nom}"  />
                    <h:inputText id="nomfr" value="#{personnelLangController.nomfr}" />
                    <h:outputLabel value="#{bundle.CreatePersonnelLangLabel_prenom}" />
                    <h:inputText id="prenomfr" value="#{personnelLangController.prenomfr}"  />
                    <h:outputLabel value="اللقب"  />
                    <h:inputText id="nomar" value="#{personnelLangController.nomar}"  />
                    <h:outputLabel value="الإسم" />
                    <h:inputText id="prenomar" value="#{personnelLangController.prenomar}"  />
                    <h:outputLabel value="#{bundle.CreatePersonnelLabel_cin}" for="cin" />
                    <h:inputText id="cin" value="#{personnelLangController.perscont.selected.cin}" title="#{bundle.CreatePersonnelTitle_cin}" />
                    <h:outputLabel value="#{bundle.CreatePersonnelLabel_email}" for="email" />
                    <h:inputText id="email" value="#{personnelLangController.perscont.selected.email}" title="#{bundle.CreatePersonnelTitle_email}" />
                    <h:outputLabel value="#{bundle.CreatePersonnelLabel_specialite}" for="specialite" />
                    <h:inputText id="specialite" value="#{personnelLangController.perscont.selected.specialite}" title="#{bundle.CreatePersonnelTitle_specialite}" />
                    <h:outputLabel value="#{bundle.CreatePersonnelLabel_tel}" for="tel" />
                    <h:inputText id="tel" value="#{personnelLangController.perscont.selected.tel}" title="#{bundle.CreatePersonnelTitle_tel}" />
                    <h:outputLabel value="#{bundle.CreatePersonnelLabel_fax}" for="fax" />
                    <h:inputText id="fax" value="#{personnelLangController.perscont.selected.fax}" title="#{bundle.CreatePersonnelTitle_fax}" />
                    <h:outputLabel value="#{bundle.CreatePersonnelLabel_addresse}" for="addresse" />
                    <h:inputText id="addresse" value="#{personnelLangController.perscont.selected.addresse}" title="#{bundle.CreatePersonnelTitle_addresse}" />
                    <h:outputLabel value="#{bundle.CreatePersonnelLabel_codepostal}" for="codepostal" />
                    <h:inputText id="codepostal" value="#{personnelLangController.perscont.selected.codepostal}" title="#{bundle.CreatePersonnelTitle_codepostal}" />
                    <h:outputLabel value="#{bundle.CreatePersonnelLabel_ville}" for="ville" />
                    <h:inputText id="ville" value="#{personnelLangController.perscont.selected.ville}" title="#{bundle.CreatePersonnelTitle_ville}" />
                    <h:outputLabel value="#{bundle.CreatePersonnelLabel_dateUpd}" for="dateUpd" />
                    <p:calendar value="#{personnelLangController.perscont.selected.dateUpd}"  mode="popup" id="dateUpd"  title="#{bundle.CreatePersonnelTitle_dateUpd}" pattern="MM/dd/yyyy HH:mm:ss" >
                       
                    </p:calendar>
                    
                    
                    <h:outputLabel value="#{bundle.CreatePersonnelLabel_dateAdd}" for="dateAdd" />
                    <p:calendar value="#{personnelLangController.perscont.selected.dateAdd}"  locale="ar" mode="popup" id="dateAdd"  title="#{bundle.CreatePersonnelTitle_dateAdd}" pattern="MM/dd/yyyy HH:mm:ss" >
                       
                    </p:calendar>
                    <h:outputLabel value="#{bundle.CreatePersonnelLabel_active}" for="active" />
                    <h:inputText id="active" value="#{personnelLangController.perscont.selected.active}" title="#{bundle.CreatePersonnelTitle_active}" />
                    <h:outputLabel value="#{bundle.CreatePersonnelLabel_position}" for="position" />
                    <h:inputText id="position" value="#{personnelLangController.perscont.selected.position}" title="#{bundle.CreatePersonnelTitle_position}" required="true" requiredMessage="#{bundle.CreatePersonnelRequiredMessage_position}"/>
                    <h:outputLabel value="#{bundle.CreatePersonnelLabel_deleted}" for="deleted" />
                    <h:inputText id="deleted" value="#{personnelLangController.perscont.selected.deleted}" title="#{bundle.CreatePersonnelTitle_deleted}" />
                    <h:outputLabel value="#{bundle.CreatePersonnelLabel_gradeIdgrade}" for="gradeIdgrade" />
                    <h:selectOneMenu id="gradeIdgrade" value="#{personnelLangController.perscont.selected.gradeIdgrade}" title="#{bundle.CreatePersonnelTitle_gradeIdgrade}" required="true" requiredMessage="#{bundle.CreatePersonnelRequiredMessage_gradeIdgrade}">
                        <f:selectItems value="#{gradeController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <br />
                <p:commandButton action="#{personnelLangController.createpers()}" value="Enregistrer"  oncomplete="CreateDialog.hide()"/>
                <br />
                
                    </h:form>
                
            </p:dialog>
            <p:layout fullPage="true">  


                <p:layoutUnit  position="north" size="100" header="Top" resizable="true" closable="true" collapsible="true">  
                   
                    <h:form>
				
								
				<p:panelGrid   columns="3">
					<h:outputText value="#{bundle.Mytext}" />
					
                                        <h:selectOneMenu value="#{internationalisationBean.locale}" onchange="submit()"
						valueChangeListener="#{internationalisationBean.localeChanged}">
						<f:selectItems value="#{internationalisationBean.countries}" /> 
					</h:selectOneMenu>

				</p:panelGrid>
			</h:form>
                </p:layoutUnit>  

                <p:layoutUnit position="south" size="100" header="Bottom" resizable="true" closable="true" collapsible="true">  
                    <h:outputText value="South unit content." />  
                </p:layoutUnit>  

                <p:layoutUnit position="west" size="200" header="Left" resizable="true" closable="true" collapsible="true">  
                    <h:outputText value="West unit content." />  
                </p:layoutUnit>  

                <p:layoutUnit position="east" size="200" header="Right" resizable="true" closable="true" collapsible="true">  
                    <h:outputText value="Right unit content." />  
                </p:layoutUnit>  

                <p:layoutUnit position="center" >  
                    <h:form id="fr">




                        <h:panelGroup >
                            <h:form  id="form" >



                                <p:dataTable     draggableColumns="false"  widgetVar="tablepers"   filteredValue="#{personnelLangController.filtredPersonnels}"  paginator="true" rows="10"
                                                 paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                                 rowsPerPageTemplate="5,10,15" value="#{personnelLangController.personnels}" var="item" selectionMode="single"  rowKey="#{item.idpersonnelLang}"  id="t" selection="#{personnelLangController.selectedPersonnellang}"  >
                                    <f:facet name="header">
                                        <p:outputPanel  >  
                                            <h:outputText value="Search all fields:" />  
                                            <p:inputText id="globalFilter" onkeyup="tablepers.filter()" />  
                                        </p:outputPanel>  


                                    </f:facet>
                                    <p:column  filterBy="#{item.idpersonnelLang}"  headerText="ID" rendered="false">
                                        <h:outputText value="#{item.idpersonnelLang}"/>
                                    </p:column>
                                    <p:column  headerText="#{bundle.ListPersonnelLangTitle_personnelIdpersonnel}"   sortBy="#{item.personnelIdpersonnel.idpersonnel}" filterBy="#{item.personnelIdpersonnel.idpersonnel}" >
                                        <h:outputText value="#{item.personnelIdpersonnel}"/>
                                    </p:column>
                                    <p:column   filterBy="#{item.nom}" headerText="Nom">
                                        <h:outputText value="#{item.nom}"/>
                                    </p:column>
                                    <p:column filterBy="#{item.prenom}" headerText="Prenom">

                                        <h:outputText value="#{item.prenom}"/>
                                    </p:column>

                                    <p:column filterBy="#{item.personnelIdpersonnel.cnrps}" headerText="cnrps">

                                        <h:outputText value="#{item.personnelIdpersonnel.cnrps}"/>
                                    </p:column>
                                    <p:column filterBy="#{item.personnelIdpersonnel.cin}" headerText="CIN">

                                        <h:outputText value="#{item.personnelIdpersonnel.cin}"/>
                                    </p:column>
                                    <p:column filterBy="#{item.personnelIdpersonnel.email}" headerText="Email">

                                        <h:outputText value="#{item.personnelIdpersonnel.email}"/>
                                    </p:column>
                                    <p:column filterBy="#{item.personnelIdpersonnel.specialite}" headerText="Specialite">

                                        <h:outputText value="#{item.personnelIdpersonnel.specialite}"/>
                                    </p:column>
                                    <p:column filterBy="#{item.personnelIdpersonnel.tel}" headerText="Tel">

                                        <h:outputText value="#{item.personnelIdpersonnel.tel}"/>
                                    </p:column>
                                    <p:column filterBy="#{item.personnelIdpersonnel.fax}" headerText="Fax">

                                        <h:outputText value="#{item.personnelIdpersonnel.fax}"/>
                                    </p:column>
                                    <p:column filterBy="#{item.personnelIdpersonnel.addresse}" headerText="Adresse">

                                        <h:outputText value="#{item.personnelIdpersonnel.addresse}"/>
                                    </p:column>
                                    <p:column filterBy="#{item.personnelIdpersonnel.codepostal}" headerText="Code Postal">

                                        <h:outputText value="#{item.personnelIdpersonnel.codepostal}"/>
                                    </p:column>
                                    <p:column filterBy="#{item.personnelIdpersonnel.ville}" headerText="Ville">

                                        <h:outputText value="#{item.personnelIdpersonnel.ville}"/>
                                    </p:column>
                                    <p:column filterBy="#{item.personnelIdpersonnel.dateUpd}" headerText="DateUpd">

                                        <h:outputText value="#{item.personnelIdpersonnel.dateUpd}">
                                            <f:convertDateTime pattern="MM/dd/yyyy" />
                                        </h:outputText>
                                    </p:column>
                                    <p:column filterBy="#{item.personnelIdpersonnel.dateAdd}" headerText="Date ajout">

                                        <h:outputText value="#{item.personnelIdpersonnel.dateAdd}">
                                            <f:convertDateTime pattern="MM/dd/yyyy" />
                                        </h:outputText>
                                    </p:column>
                                    <p:column filterBy="#{item.personnelIdpersonnel.active}" headerText="Active">

                                        <h:outputText value="#{item.personnelIdpersonnel.active}"/>
                                    </p:column>
                                    <p:column filterBy="#{item.personnelIdpersonnel.position}" headerText="Position">

                                        <h:outputText value="#{item.personnelIdpersonnel.position}"/>
                                    </p:column>
                                    <p:column filterBy="#{item.personnelIdpersonnel.deleted}" headerText="deleted">

                                        <h:outputText value="#{item.personnelIdpersonnel.deleted}"/>
                                    </p:column>
                                    <p:column filterBy="#{item.personnelIdpersonnel.gradeIdgrade}" headerText="Grade">

                                        <h:outputText value="#{item.personnelIdpersonnel.gradeIdgrade}"/>
                                    </p:column>

                                    <p:column filterBy="#{item.langIdlang}" headerText="Lang" rendered="false">

                                        <h:outputText value="#{item.langIdlang}"/>
                                    </p:column>
                                    <f:facet name="footer">  
                                        <f:facet name="footer">  
                                            <p:commandButton   id="createButton" value="Ajouter" icon="ui-icon-search"  
                                                               oncomplete="CreateDialog.show()"/>
                                            <p:commandButton   id="viewButton" value="Details" icon="ui-icon-search"  
                                                               oncomplete="PosteDialog.show()"/>
                                      
                                            <p:commandButton id="destroy" value="supprimer" icon="ui-icon-delete"  onclick="confirmation.show()"   type="button"
                                                             />  
                                        </f:facet> 
                                    </f:facet>  
                                </p:dataTable>

                                <p:dialog   id="confirmDialog"  
                                            header="Supprimer "  widgetVar="confirmation"> 
                                    <h:outputText value="Spprimer #{personnelLangController.selectedPersonnellang.nom} #{personnelLangController.selectedPersonnellang.prenom} ?"/>
                                    <br> </br>
                                    <p:commandButton id="confirm" value="Oui" update="t" oncomplete="confirmation.hide()"  
                                                     actionListener="#{personnelLangController.destroy()}" />  
                                    <p:commandButton id="decline" value="non" onclick="confirmation.hide()" type="button" />   

                                </p:dialog>> 

                                
                            </h:form>
                            
                        </h:panelGroup>

                    </h:form>
                </p:layoutUnit>  
            </p:layout>
        </ui:define>
    </ui:composition>

</html>
